package org.nbict.iot.task.realtime.filter;

import org.apache.storm.trident.operation.BaseFilter;
import org.apache.storm.trident.tuple.TridentTuple;

/**
 * Created by songseven on 18/6/25.
 */
public class UploadFilter extends BaseFilter {
    @Override
    public boolean isKeep(TridentTuple tuple) {

        Integer action = tuple.getInteger(1);
        String car_vin = tuple.getString(0);

        if (action == 2 || action == 3) {
//            System.out.println("upload filter => " + action);
//            System.out.println("car_vin => " + car_vin);
            return true;
        }
        return false;
    }
}
